Page({
  data: {
    isDarkMode: false
  },
  onShow() {
    const isDark = wx.getStorageSync('isDarkMode');
    this.setData({
      isDarkMode: typeof isDark === 'boolean' ? isDark : (getApp().globalData.isDarkMode || false)
    });
  },
  goToTaobao() {
    wx.setClipboardData({
      data: 'https://shop.m.taobao.com/shop/shop_index.htm?sellerId=2187101423&shopId=137017321&inShopPageId=305803142&pathInfo=shop/index2',
      success() {
        wx.showModal({
          title: '提示',
          content: '链接已复制，请在淘宝App中粘贴打开购买页面。',
          showCancel: false
        });
      }
    });
  }
}); 